Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure rm changes #32

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Azure rm changes #32

wants to merge 17 commits into from

Conversation

aravindan89
Copy link
Contributor

Before creating a pull request make sure that:

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)

Please remove this line and everything above and fill the following sections:

JIRA link (if applicable)

Change description

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[ ] No

.terraform-version Outdated Show resolved Hide resolved
allowed_certificate_thumbprints = local.thumbprints_in_quotes_str
s2s_client_id = data.azurerm_key_vault_secret.s2s_client_id.value
s2s_client_secret = data.azurerm_key_vault_secret.s2s_client_secret.value
s2s_base_url = local.s2sUrl
}
}

data "template_file" "api_template" {
template = "${file("${path.module}/template/api.json")}"
}
resource "azurerm_template_deployment" "api" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be using one of our terraform modules for api management not an arm template

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this causes the resource to be deleted, we cannot make this change.

@@ -0,0 +1,17 @@
terraform {
backend "azurerm" {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what adds saving the state to azure, if it's not here then the state won't get saved to azure ever.

note that the state file is keyed by the 'product' var in your Jenkinsfile so you might want to change it to be more specific to your repo:

https://github.com/hmcts/ccpay-payment-api-gateway/blob/master/Jenkinsfile_CNP#L5

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the state config never existed before. But the last time the pipeline executed successfully on 12/10/2020, it was pointing at the state file in question now.

Will discuss with project team to change the product name. However, we need to import the existing resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the Jenkins file with new name.

@hmcts-jenkins-a-to-c
Copy link
Contributor

Plan Result

⚠️ Resource Deletion will happen ⚠️

This plan contains resource delete operation. Please check the plan result very carefully!

Plan: 1 to add, 0 to change, 4 to destroy.
  • Create
    • azurerm_template_deployment.api[0]
  • Delete
    • module.api_mgmt_api.azurerm_api_management_api.api
    • module.api_mgmt_api.azurerm_api_management_product_api.link_to_product[0]
    • module.api_mgmt_policy.azurerm_api_management_api_policy.api_policy
    • module.api_mgmt_product.azurerm_api_management_product.product
Change Result (Click me)
  # azurerm_template_deployment.api[0] will be created
  + resource "azurerm_template_deployment" "api" {
      + deployment_mode     = "Incremental"
      + id                  = (known after apply)
      + name                = "paymentsgw-api-aat"
      + outputs             = (known after apply)
      + parameters          = {
          + "apiBasePath"              = "payments-api"
          + "apiManagementServiceName" = "core-api-mgmt-aat"
          + "apiName"                  = "paymentsgw-api"
          + "apiProductName"           = "paymentsgw"
          + "policy"                   = <<-EOT
                <policies>
                    <backend>
                        <base/>
                    </backend>
                    <inbound>
                        <base/>
                        <choose>
                            <when condition="@(context.Request.Certificate == null || context.Request.Certificate.NotAfter &lt; DateTime.Now || context.Request.Certificate.NotBefore &gt; DateTime.Now || !(new string[] {&quot;B1BF8007527F85085D7C4A3DC406A9A6D124D721&quot;,&quot;13D1848E8B050CE55E4D41A35A60FF4A17E686A6&quot;,&quot;B1C45E55A1E93AD43A473972CFF490722EEF1E38&quot;,&quot;B660C97A7CC2734ABD41FBF9F6ADAA61B0C399D4&quot;,&quot;B9D9E70AC23EAF8EA094F6B59EF77FF77D977CBE&quot;}.Any(c => c == context.Request.Certificate.Thumbprint)))" >
                                <return-response>
                                    <set-status code="403" reason="Invalid client certificate. Please check expiry."/>
                                </return-response>
                            </when>
                        </choose>
                        <!-- generate totp -->
                        <set-variable name="client_id" value="api_gw" />
                        <set-variable name="client_secret" value="C5OI566EGMPHT3CC" />
                        <set-variable name="one_time_password" value="@{
                                const string Base32AllowedCharacters = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ234567&quot;;
                                var bits = &quot;C5OI566EGMPHT3CC&quot;.ToUpper().ToCharArray().Select(c => Convert.ToString(Base32AllowedCharacters.IndexOf(c), 2).PadLeft(5, '0')).Aggregate((a, b) => a + b);
                                var secretKeyBytes = Enumerable.Range(0, bits.Length / 8).Select(i => Convert.ToByte(bits.Substring(i * 8, 8), 2)).ToArray();
                
                                var unixTimestamp = (long) (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
                                var timeIndex = unixTimestamp / 30;
                                byte[] challenge = BitConverter.GetBytes(timeIndex);
                                if (BitConverter.IsLittleEndian) {
                                    Array.Reverse(challenge);
                                }
                
                                HMACSHA1 hmac = new HMACSHA1(secretKeyBytes);
                                byte[] hash = hmac.ComputeHash(challenge);
                                int offset = hash[19] &amp; 0xf;
                                int truncatedHash = hash[offset] &amp; 0x7f;
                                for (int i = 1; i &lt; 4; i++)
                                {
                                    truncatedHash &lt;&lt;= 8;
                                    truncatedHash |= hash[offset + i] &amp; 0xff;
                                }
                                truncatedHash %= 1000000;
                                return truncatedHash.ToString(&quot;D6&quot;);
                            }"/>
                        <send-request ignore-error="false" timeout="20" response-variable-name="s2sBearerToken" mode="new">
                            <set-url>http://rpe-service-auth-provider-aat.service.core-compute-aat.internal/lease</set-url>
                            <set-method>POST</set-method>
                            <set-header name="Content-Type" exists-action="override">
                                <value>application/json</value>
                            </set-header>
                            <set-body>@{
                                return new JObject(
                                new JProperty("microservice", (string)context.Variables["client_id"]),
                                new JProperty("oneTimePassword", (string)context.Variables["one_time_password"])
                                ).ToString();
                                }</set-body>
                        </send-request>
                
                        <set-header name="ServiceAuthorization" exists-action="override">
                            <value>@("Bearer " + ((IResponse)context.Variables["s2sBearerToken"]).Body.As&lt;string&gt;())</value>
                        </set-header>
                    </inbound>
                    <outbound>
                        <base/>
                        <choose>
                            <when condition="@(context.Response.StatusCode == 200)">
                                <find-and-replace from="giro_slip_no" to="bank_giro_credit_slip_number" />
                                <find-and-replace from="volume" to="volume_amount" />
                                <find-and-replace from="&quot;reference&quot;" to="&quot;fee_reference&quot;" />
                            </when>
                        </choose>
                    </outbound>
                    <on-error>
                        <base/>
                    </on-error>
                </policies>
            EOT
          + "serviceUrl"               = "http://payment-api-aat.service.core-compute-aat.internal"
        }
      + resource_group_name = "core-infra-aat"
      + template_body       = jsonencode(
            {
              + $schema        = "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
              + contentVersion = "1.0.0.0"
              + parameters     = {
                  + apiBasePath              = {
                      + metadata = {
                          + description = "Path to the API (excluding host)"
                        }
                      + type     = "string"
                    }
                  + apiManagementServiceName = {
                      + metadata = {
                          + description = "API Management service name"
                        }
                      + type     = "string"
                    }
                  + apiName                  = {
                      + metadata = {
                          + description = "Name of the API (gateway)"
                        }
                      + type     = "string"
                    }
                  + apiProductName           = {
                      + metadata = {
                          + description = "API Management product name"
                        }
                      + type     = "string"
                    }
                  + policy                   = {
                      + type = "string"
                    }
                  + serviceUrl               = {
                      + metadata = {
                          + description = "URL of the backend service (to be protected by the API)"
                        }
                      + type     = "string"
                    }
                }
              + resources      = [
                  + {
                      + apiVersion = "2017-03-01"
                      + dependsOn  = []
                      + name       = "[concat(parameters('apiManagementServiceName') ,'/', parameters('apiProductName'))]"
                      + properties = {
                          + approvalRequired     = true
                          + displayName          = "[parameters('apiProductName')]"
                          + state                = "published"
                          + subscriptionRequired = true
                        }
                      + type       = "Microsoft.ApiManagement/service/products"
                    },
                  + {
                      + apiVersion = "2017-03-01"
                      + dependsOn  = [
                          + "[resourceId('Microsoft.ApiManagement/service/products', parameters('apiManagementServiceName'), parameters('apiProductName'))]",
                        ]
                      + name       = "[concat(parameters('apiManagementServiceName') ,'/', parameters('apiProductName'), '/', variables('developersGroupName'))]"
                      + properties = {
                          + builtIn     = true
                          + description = "Developers group"
                          + displayName = "Developers"
                          + type        = "system"
                        }
                      + type       = "Microsoft.ApiManagement/service/products/groups"
                    },
                  + {
                      + apiVersion = "2017-03-01"
                      + dependsOn  = [
                          + "[variables('fullApiProductName')]",
                        ]
                      + name       = "[concat(parameters('apiManagementServiceName'), '/', parameters('apiName'))]"
                      + properties = {
                          + displayName = "Payments API"
                          + path        = "[parameters('apiBasePath')]"
                          + protocols   = [
                              + "HTTPS",
                            ]
                          + serviceUrl  = "[parameters('serviceUrl')]"
                        }
                      + resources  = [
                          + {
                              + apiVersion = "2017-03-01"
                              + dependsOn  = [
                                  + "[variables('fullApiName')]",
                                ]
                              + name       = "getPayments"
                              + properties = {
                                  + description = "Returns all payments that match filter criteria"
                                  + displayName = "Get list of payments"
                                  + method      = "GET"
                                  + request     = {
                                      + description     = "Gets payments filtered by query params"
                                      + queryParameters = [
                                          + {
                                              + description = "Format - date time (as full-date in RFC3339). The start date time to filter on. If the time is not supplied then it will be defaulted to 00:00:00"
                                              + name        = "start_date"
                                              + type        = "string"
                                            },
                                          + {
                                              + description = "Format - date time (as full-date in RFC3339). The end date to filter on. If the time is not supplied then it will be defaulted to 00:00:00"
                                              + name        = "end_date"
                                              + type        = "string"
                                            },
                                          + {
                                              + description = "the method used for payment. Available values : CARD, PBA, CASH, CHEQUE, POSTAL_ORDER"
                                              + name        = "payment_method"
                                              + type        = "string"
                                            },
                                        ]
                                    }
                                  + responses   = [
                                      + {
                                          + description     = "successful operation"
                                          + representations = [
                                              + {
                                                  + contentType = "application/json"
                                                  + sample      = <<-EOT
                                                        {
                                                          "payments": [
                                                            {
                                                              "_links": {
                                                                "cancel": {
                                                                  "href": "string",
                                                                  "method": "string"
                                                                },
                                                                "next_url": {
                                                                  "href": "string",
                                                                  "method": "string"
                                                                },
                                                                "self": {
                                                                  "href": "string",
                                                                  "method": "string"
                                                                }
                                                              },
                                                              "account_number": "string",
                                                              "amount": 0, // Payment amount in GBP
                                                              "case_reference": "string",
                                                              "ccd_case_number": "string", // string ccd case number for the fees
                                                              "channel": "string", // The channel used for payment Enum: [ "digital bar", "online", "solicitors portal", "telephony" ]
                                                              "currency": "GBP",
                                                              "customer_reference": "string",
                                                              "date_created": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
                                                              "date_updated": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
                                                              "description": "string",
                                                              "external_provider": "string", // External provider for e.g. 'gov pay' in case of online card payments, 'barclaycard' in case of card payments in court. Possible values: 'gov pay', 'middle office provider' (for Payment By Account), 'barclaycard'. This will be empty for cheques, postal order and cash.
                                                              "external_reference": "string", // The reference number given by the external provider. In case of cheque or postal order the value in this field will be the cheque number or the postal order number. In case of card payments made in court, the value in this field will be the authorisation code. For cash it will be blank.
                                                              "fees": [
                                                                {
                                                                  "calculated_amount": 0, // Calculated amount for the fee. Usually this will be the fee amount. In case where the fees were charged for the number of copies, the calculated amount is the amount of fees for the total number of copies.
                                                                  "ccd_case_number": "string", // ccd case number for the fees
                                                                  "code": "string", // Fee identifier
                                                                  "memo_line": "string", // example: GOV - Paper fees - Money claim £1,000-1,500
                                                                  "natural_account_code": "string", // example: 4481102158
                                                                  "reference": "string", // any reference associated to the fee payment; for e.g. could be case number in from legacy case management systems for e.g. caseman, family man etc.
                                                                  "version": "string", // Version of the fee applicable for a given time period
                                                                  "volume": 0 // Fee volume e.g. in the case where fees were charged for the number of copies. In case where the nature of the fees was such that volume is not application i.e. application fee, then this will be defaulted to 1
                                                                }
                                                              ],
                                                              "giro_slip_no": "string", // Number of the paper slip attached to bank instruction
                                                              "id": "string",
                                                              "method": "string", // the method used for payment
                                                              "organisation_name": "string",
                                                              "payment_group_reference": "string", // Group associated to multiple payments
                                                              "payment_reference": "string", // Unique identifier for the payment
                                                              "reference": "string",
                                                              "reported_date_offline": "string", // Date of payment reported by the court
                                                              "service_name": "string", // The reform service through which the payment was made
                                                              "site_id": "string", // Standardised court identification number, using the pre-existing site IDs
                                                              "status": "string", // The status of the payment. For cheque and postal orders submitted via the DigitalBAR channel, the status will be Pending. Enum: [ Pending, Payment initiated, Success, Failed, Timed out, Declined, Cancelled, Error ]
                                                              "status_histories": [
                                                                {
                                                                  "date_created": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
                                                                  "date_updated": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
                                                                  "external_status": "string",
                                                                  "status": "string"
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                    EOT
                                                },
                                            ]
                                          + statusCode      = 200
                                        },
                                      + {
                                          + description = "Probably invalid client certificate"
                                          + statusCode  = 403
                                        },
                                      + {
                                          + description = "Bad request"
                                          + statusCode  = 400
                                        },
                                    ]
                                  + urlTemplate = "/payments"
                                }
                              + type       = "operations"
                            },
                          + {
                              + apiVersion = "2017-03-01"
                              + dependsOn  = [
                                  + "[variables('fullApiName')]",
                                ]
                              + name       = "paymentByReference"
                              + properties = {
                                  + description        = "Gets payment by reference"
                                  + displayName        = "Gets payment by reference"
                                  + method             = "GET"
                                  + responses          = [
                                      + {
                                          + description     = "successful operation"
                                          + representations = [
                                              + {
                                                  + contentType = "application/json"
                                                },
                                            ]
                                          + statusCode      = 200
                                        },
                                      + {
                                          + description = "Invalid client certificate or unauthorised token"
                                          + statusCode  = 403
                                        },
                                      + {
                                          + description = "Payment not found"
                                          + statusCode  = 404
                                        },
                                    ]
                                  + templateParameters = [
                                      + {
                                          + description = "Payment reference"
                                          + name        = "payment_reference"
                                          + type        = "string"
                                        },
                                    ]
                                  + urlTemplate        = "/payments/{payment_reference}"
                                }
                              + type       = "operations"
                            },
                        ]
                      + type       = "Microsoft.ApiManagement/service/apis"
                    },
                  + {
                      + apiVersion = "2017-03-01"
                      + dependsOn  = [
                          + "[variables('fullApiProductName')]",
                          + "[variables('fullApiName')]",
                        ]
                      + name       = "[concat(parameters('apiManagementServiceName'), '/', parameters('apiProductName'), '/', parameters('apiName'))]"
                      + type       = "Microsoft.ApiManagement/service/products/apis"
                    },
                  + {
                      + apiVersion = "2017-03-01"
                      + dependsOn  = [
                          + "[variables('fullApiProductName')]",
                          + "[variables('fullApiName')]",
                        ]
                      + name       = "[concat(parameters('apiManagementServiceName'), '/', parameters('apiName'),'/policy')]"
                      + properties = {
                          + policyContent = "[parameters('policy')]"
                        }
                      + type       = "Microsoft.ApiManagement/service/apis/policies"
                    },
                ]
              + variables      = {
                  + developersGroupName = "Developers"
                  + fullApiName         = "[concat('Microsoft.ApiManagement/service/', parameters('apiManagementServiceName'), '/apis/', parameters('apiName'))]"
                  + fullApiProductName  = "[concat('Microsoft.ApiManagement/service/', parameters('apiManagementServiceName'), '/products/', parameters('apiProductName'))]"
                }
            }
        )
    }

  # module.api_mgmt_api.azurerm_api_management_api.api will be destroyed
  - resource "azurerm_api_management_api" "api" {
      - api_management_name   = "core-api-mgmt-aat" -> null
      - display_name          = "Payments API" -> null
      - id                    = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/core-infra-aat/providers/Microsoft.ApiManagement/service/core-api-mgmt-aat/apis/payments-api" -> null
      - is_current            = true -> null
      - is_online             = false -> null
      - name                  = "payments-api" -> null
      - path                  = "payments-api" -> null
      - protocols             = [
          - "https",
        ] -> null
      - resource_group_name   = "core-infra-aat" -> null
      - revision              = "1" -> null
      - service_url           = "http://payment-api-aat.service.core-compute-aat.internal" -> null
      - soap_pass_through     = false -> null
      - subscription_required = true -> null

      - import {
          - content_format = "swagger-link-json" -> null
          - content_value  = "https://raw.githubusercontent.com/hmcts/reform-api-docs/master/docs/specs/ccpay-payment-app.recon-payments-v0.3.json" -> null
        }

      - subscription_key_parameter_names {
          - header = "Ocp-Apim-Subscription-Key" -> null
          - query  = "subscription-key" -> null
        }

      - timeouts {}
    }

  # module.api_mgmt_api.azurerm_api_management_product_api.link_to_product[0] will be destroyed
  - resource "azurerm_api_management_product_api" "link_to_product" {
      - api_management_name = "core-api-mgmt-aat" -> null
      - api_name            = "payments-api" -> null
      - id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/core-infra-aat/providers/Microsoft.ApiManagement/service/core-api-mgmt-aat/products/payments/apis/payments-api" -> null
      - product_id          = "payments" -> null
      - resource_group_name = "core-infra-aat" -> null

      - timeouts {}
    }

  # module.api_mgmt_policy.azurerm_api_management_api_policy.api_policy will be destroyed
  - resource "azurerm_api_management_api_policy" "api_policy" {
      - api_management_name = "core-api-mgmt-aat" -> null
      - api_name            = "payments-api" -> null
      - id                  = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/core-infra-aat/providers/Microsoft.ApiManagement/service/core-api-mgmt-aat/apis/payments-api/policies/policy" -> null
      - resource_group_name = "core-infra-aat" -> null
      - xml_content         = <<-EOT
            <policies>
            	<backend>
            		<base />
            	</backend>
            	<inbound>
            		<base />
            		<choose>
            			<when condition="@(context.Request.Certificate == null || context.Request.Certificate.NotAfter < DateTime.Now || context.Request.Certificate.NotBefore > DateTime.Now || !(new string[] {"B1BF8007527F85085D7C4A3DC406A9A6D124D721","13D1848E8B050CE55E4D41A35A60FF4A17E686A6","B1C45E55A1E93AD43A473972CFF490722EEF1E38","B660C97A7CC2734ABD41FBF9F6ADAA61B0C399D4","B9D9E70AC23EAF8EA094F6B59EF77FF77D977CBE","9AF616DC3860C9736BBD20ADAD34AAFD913FD6CA","B49BDDE7818B78058AC7401BE0284A40845031E3","E5F54E7BA2B780E2B1B1FFAC68F801251935BE80","C6E2FBAB5FED58FD86C10A3BD212CF44668FD1A3","7744A2F56BD3B73C0D7FED61309E1C65AF08538C"}.Any(c => c == context.Request.Certificate.Thumbprint)))">
            				<return-response>
            					<set-status code="403" reason="Invalid client certificate. Please check expiry." />
            				</return-response>
            			</when>
            		</choose>
            		<!-- generate totp -->
            		<set-variable name="client_id" value="api_gw" />
            		<set-variable name="client_secret" value="C5OI566EGMPHT3CC" />
            		<set-variable name="one_time_password" value="@{
                            const string Base32AllowedCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
                            var bits = "C5OI566EGMPHT3CC".ToUpper().ToCharArray().Select(c => Convert.ToString(Base32AllowedCharacters.IndexOf(c), 2).PadLeft(5, '0')).Aggregate((a, b) => a + b);
                            var secretKeyBytes = Enumerable.Range(0, bits.Length / 8).Select(i => Convert.ToByte(bits.Substring(i * 8, 8), 2)).ToArray();
            
                            var unixTimestamp = (long) (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
                            var timeIndex = unixTimestamp / 30;
                            byte[] challenge = BitConverter.GetBytes(timeIndex);
                            if (BitConverter.IsLittleEndian) {
                                Array.Reverse(challenge);
                            }
            
                            HMACSHA1 hmac = new HMACSHA1(secretKeyBytes);
                            byte[] hash = hmac.ComputeHash(challenge);
                            int offset = hash[19] & 0xf;
                            int truncatedHash = hash[offset] & 0x7f;
                            for (int i = 1; i < 4; i++)
                            {
                                truncatedHash <<= 8;
                                truncatedHash |= hash[offset + i] & 0xff;
                            }
                            truncatedHash %= 1000000;
                            return truncatedHash.ToString("D6");
                        }" />
            		<send-request ignore-error="false" timeout="20" response-variable-name="s2sBearerToken" mode="new">
            			<set-url>http://rpe-service-auth-provider-aat.service.core-compute-aat.internal/lease</set-url>
            			<set-method>POST</set-method>
            			<set-header name="Content-Type" exists-action="override">
            				<value>application/json</value>
            			</set-header>
            			<set-body>@{
                            return new JObject(
                            new JProperty("microservice", (string)context.Variables["client_id"]),
                            new JProperty("oneTimePassword", (string)context.Variables["one_time_password"])
                            ).ToString();
                            }</set-body>
            		</send-request>
            		<set-header name="ServiceAuthorization" exists-action="override">
            			<value>@("Bearer " + ((IResponse)context.Variables["s2sBearerToken"]).Body.As<string>())</value>
            		</set-header>
            	</inbound>
            	<outbound>
            		<base />
            		<choose>
            			<when condition="@(context.Response.StatusCode == 200 || context.Response.StatusCode == 206)">
            				<find-and-replace from="giro_slip_no" to="bank_giro_credit_slip_number" />
            				<find-and-replace from="volume" to="volume_amount" />
            				<find-and-replace from=""reference"" to=""fee_reference"" />
            			</when>
            		</choose>
            	</outbound>
            	<on-error>
            		<base />
            	</on-error>
            </policies>
        EOT -> null

      - timeouts {}
    }

  # module.api_mgmt_product.azurerm_api_management_product.product will be destroyed
  - resource "azurerm_api_management_product" "product" {
      - api_management_name   = "core-api-mgmt-aat" -> null
      - approval_required     = true -> null
      - display_name          = "payments" -> null
      - id                    = "/subscriptions/1c4f0704-a29e-403d-b719-b90c34ef14c9/resourceGroups/core-infra-aat/providers/Microsoft.ApiManagement/service/core-api-mgmt-aat/products/payments" -> null
      - product_id            = "payments" -> null
      - published             = true -> null
      - resource_group_name   = "core-infra-aat" -> null
      - subscription_required = true -> null
      - subscriptions_limit   = 20 -> null

      - timeouts {}
    }

Plan: 1 to add, 0 to change, 4 to destroy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants